{php $si=0;$subcount=count($subs);}
{loop $subs $sid $data}
{php $si++;$i=0;}
<table  cellpadding="0" cellspacing="1" class="table_form">
  <caption>
  <span class="f_r" style="padding-right:10px;">
  投票人数：{$vote_data[$voteid][votes]}
  <if $subcount==1> 总票数：{$vote_data[$sid]['total']}</if>
  {if $subcount>1}
  (总票数：{intval($vote_data[$sid][total])})
  {/if}
  </span>
  <span class="f_l" style="padding-left:10px;">{$data[subject]}</span>
  </caption>
  
  {loop $data[options] $optionid $option}
  {php $i++; $votes=intval($vote_data[$sid][$optionid]);$per=0;}
  {if $vote_data[$sid]['total']}
  {php $per=intval($votes/$vote_data[$sid]['total']*100);}
  {/if}
  <tr>
    <td width="30%" class="option">{$i} . {$option[option]}</td>
    <td width="10%" align="center">{$votes}</td>
    <td width="30%"><div class="bar" style="width:{$per}%">&nbsp;</div></td>
    <td width="10%" align="center">{$per} % </td>
  </tr>
  {/loop}
</table>
{/loop}
